<script type="text/javascript" >
    sttheme.sortColumn();
    sttheme.shortAction();
</script>
<style type="text/css">
    #stcontainer th.column-id {
        width: 200px;
    }
</style>
<div class="w100p bgl">
    <div class="w100p bgr">
        <div class="inner_container">
            <table class="widefat" cellspacing="0">
                <thead>
                    <tr>
                        <?php print_column_headers('sttheme_sttheme'); ?>
                    </tr>
                </thead>
                <input type="hidden" id="current_action" value="game">
                <tbody>
                    <?php
                    if (count($results) > 0) {
                        $tr_class = "";
                        foreach ($results as $result) {
                            if (empty($tr_class) || $tr_class == "class='bg_gray2'") {
                                $tr_class = "class='bg_gray1'";
                            } else {
                                $tr_class = "class='bg_gray2'";
                            }
                            $status = $result->is_top ? "success.png" : "error.png";
                            $thele  = $result->thele_type == 'external' ? $result->thele_external : get_page_link($result->thele_internal) ; 
                            $ketqua  = $result->ketqua_type == 'external' ? $result->ketqua_external : get_page_link($result->ketqua_internal) ; 

                            echo "<tr id='$result->id' $tr_class >"
                            . "<td><img style='max-height:100px; max-width:100px;' src='" . $result->name . "' alt=''>"
                            . "<div class=\"row-actions short_action\">"
                            . "<span class='edit' action='gameEdit' short_action='' id='$result->id'>Edit | </span>"
                            . "<span class='trash' short_action='delete' id='$result->id' confirm='Are you sure you want to delete this game?'>Trash </span>"
                            . "</div>"
                            . "</td>"
                            . "<td align='center'><img style='height:100px; width:200px;' src='" . $result->banner . "' alt=''></td>"
                            . "<td align='center'><a href='{$thele}'><img style='max-height:100px; max-width:100px;' src='" . $result->thele_image . "' alt=''></a></td>"
                            . "<td align='center'><a href='{$ketqua}'><img style='max-height:100px; max-width:100px;' src='" . $result->ketqua_image . "' alt=''></a></td>"
                            . "<td> <img src='"; echo bloginfo('template_url'); echo "/admin-functions/images/{$status}'> </td>"
                            . "</tr>"
                            ;
                        }
                    }
                    ?>
                </tbody>
            </table>
            <div class="page_d">
                <?php echo $pagination ?>
                <div class="cl"></div>
            </div>

        </div>
    </div>
</div>